package com.example.spirngbootbase.controller;

import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName HelloController
 * @Description TODO
 * @Author mujiechen
 * @Date 2022/7/19
 */
@RestController
public class HelloController {

    @RequestMapping("/hello")
    @PreAuthorize("hasAnyAuthority('system:sysuser:list')")
    public  String hello(){
        return "hello";
    }


    @RequestMapping("/hello1")
    @PreAuthorize("@ex.hasAuthority('system:sysuser:list')")
    public  String hello1(){
        return "hello1";
    }
}
